Skip to content

Add Smoke Test for Tabs #718

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 13, 2025
Merged

Add Smoke Test for Tabs #718

merged 4 commits into from
Aug 13, 2025

Conversation

krishpdev
Copy link
Contributor

Relevant Links

Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1976537
TestRail: 134455

Description of Code / Doc Changes

Leave a bullet-pointed list of changes you made.

Created a test to ensure that middle clicking or pressing control/command and clicking a hyperlink
will correctly create a new background tab. Selenium does not directly support
middle clicking so I used the pynput library to simulate middle clicking. The test
will dynamically determine the location of the hyperlink element so the mouse will correctly
over it before initiating a middle click.

Added control click and middle click functions to page_base.py

Process Changes Required

Mark the relevant boxes:

  • Adds a dependency (rerun pipenv install)
  • Changes the BasePage
  • Changes or creates a BOM/POM (name the object model): _
  • Changes CI flow
  • Changes scheduled Beta or DevEdition
  • Changes Git hooks or Github settings
  • Changes L10n harness

Screenshots or Explanations

If you need to explain your code, do it here.

Comments or Future Work

Do we need to start another PR soon to address something you saw while working on this?

Workflow Checklist

  • Please request reviewers
  • If this is an unblocker, please post in Slack.
  • If asked to address comments, please resolve conversations.
  • If asked to change code, please re-request review from the person who wanted changes.

Thank you!

@krishpdev krishpdev changed the title Rework and Fix Tabs Smoke Test Add Smoke Test for Tabs Aug 11, 2025
@Tracy-Walker Tracy-Walker self-requested a review August 12, 2025 13:12
Copy link
Collaborator

@Tracy-Walker Tracy-Walker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'll want to improve middle_click() to work in both the Chrome and Content contexts. I'll create a bug for that work. Otherwise this looks good. I'll ask to push this through the two random test failures.

@Tracy-Walker
Copy link
Collaborator

Tracy-Walker commented Aug 13, 2025

@ben-c-at-moz, Please push this through. This PR touched BasePage class. Thus CI is running everything and experiencing random failures. The two tests failing in the latest commit did not fail in previous commit and all tests PASS on Mac.

Per my review comment, we'll want to improve the middle_click() method added here. But I'll do that in another bug/patch.

@ben-c-at-moz ben-c-at-moz merged commit eb4354c into mozilla:main Aug 13, 2025
22 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants